#pragma once

class channel
{
public:
    channel(int fd,pid_t id)
    :_wfd(fd),
    _childid(id)
    {} 

    int getwfd()
    {
        return _wfd;
    }
    pid_t getid()
    {
        return _childid;
    }

    void send(int task)
    {
        ::write(_wfd,&task,sizeof(task));
    }
    
private:
    int _wfd;
    pid_t _childid;

};